package org.finesys.ai.service.impl;

import java.util.ArrayList;
import java.util.List;

import org.finesys.ai.convert.AigcProviderModelConvert;
import org.finesys.ai.entity.AigcProviderModel;
import org.finesys.ai.mapper.AigcProviderModelMapper;
import org.finesys.ai.service.AigcProviderModelService;
import org.finesys.ai.vo.AigcProviderModelExcelVO;
import org.finesys.common.mp.core.service.impl.BaseServiceImpl;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.metadata.OrderItem;

@Service
public class AigcProviderModelSericeImpl extends BaseServiceImpl<AigcProviderModelMapper, AigcProviderModel> implements AigcProviderModelService {


    @Override
    public List<AigcProviderModel> findProviderList(String modelType) {
        return baseMapper.findProviderList(modelType);
    }

    @Override
    public List<AigcProviderModelExcelVO> listExcel() {
        List<AigcProviderModel> list = this.list();
        return AigcProviderModelConvert.INSTANCE.convertList(list);
    }


    @Override
    public List<OrderItem> getOrders(){
        List<OrderItem> orderItems=new ArrayList<>();
        OrderItem orderItem=new OrderItem();
        orderItem.setColumn("provider");
        orderItem.setAsc(true);
        orderItems.add(orderItem);
        OrderItem orderItem1=new OrderItem();
        orderItem1.setColumn("model_type");
        orderItem1.setAsc(true);
        orderItems.add(orderItem1);
        OrderItem orderItem2=new OrderItem();
        orderItem2.setColumn("model_name");
        orderItem2.setAsc(true);
        orderItems.add(orderItem2);
        return orderItems;
    }
}
